home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Applications
/
Fixation 1.3
/
error.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-17
|
992b
|
60 lines
#include <stdarg.h>
#include <stdio.h>
#include "error.h"
//#include "BDC.h"
// alerts
#define rVerifyAlert 228
extern GDHandle maindev;
void Terminate(void);
int verifyFailed(char *file, long line)
{
unsigned char i;
char buffer[1024];
buffer[0] = sprintf( &buffer[1],
"Error in %s on line %ld. Please hit 'g' and RETURN.", file, line);
DebugStr( (unsigned char *) buffer );
Terminate();
return 0;
}
/*int verifyFailed(char *file, long line)
{
Str255 lines, files;
unsigned char i;
SetGWorld(nil, maindev);
NumToString(line, lines);
for (i=0;file[i];i++)
files[i+1] = file[i];
files[0] = i;
ParamText(files, lines, 0, 0);
StopAlert(rVerifyAlert, 0);
ExitToShell();
return 0;
}
*/
/*
** VDebugStr()
*/
void
VDebugStr( char * format, ... )
{
// if ( bDebugMessages )
{
va_list params;
char buffer[1024];
va_start(params,format);
buffer[0] = vsprintf( &buffer[1], format, params );
DebugStr( (unsigned char *) buffer );
va_end(params);
}
}